package org.hk.kg.ui;

import java.awt.BorderLayout;
import java.awt.Component;

import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

import org.hk.kg.utils.Constants;

public class KGFrame extends JFrame{
	private static final long serialVersionUID = -4891019730333617706L;
	private JComponent current;
	public IHTMLDisplayer displayer;
	private JScrollPane scrollPane;
	public KGFrame()
	{
		this.setSize(Constants.DEFAULT_WIDTH, Constants.DEFAULT_HEIGHT);
		KGUiContext.setDisplayMain(this);
		initailize();
	}
	
	public void initailize()
	{
		this.displayer = new KGBrowserFrame();
		this.scrollPane = new JScrollPane((Component) this.displayer);
		this.setJMenuBar(new KGMenu());
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setLayout(new BorderLayout());
		this.add(this.scrollPane,BorderLayout.CENTER);
	}
	
	public void setStatusBar(JPanel panel)
	{
		this.add(panel,BorderLayout.SOUTH);
	}
}
